package util;

import java.net.URL;

import javax.swing.ImageIcon;

public class SpriteUtils {

	public static ImageIcon loadSprite(String path, Object clazz) {
	    URL imgURL = clazz.getClass().getResource(path);
	    if (imgURL != null) {
	        return new ImageIcon(imgURL);
	    } else {
	        System.err.println("Couldn't find file: " + path);
	        return null;
	    }
	}
	
}
